package com.chinaunicom.beanfactorypostprocessor;

import com.chinaunicom.beanpostprocessor2.Cat;
import com.chinaunicom.beanpostprocessor2.MyBeanPostProcessor;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author liry
 * @version 1.0
 * @date Created on 2021/12/12 11:14
 * Description:
 */
public class BeanFactoryPostProcessorTest {

	public static void main(String[] args) {
		ApplicationContext applicationContext = new ClassPathXmlApplicationContext("beans-beanfactorypostprocessor.xml");

		MyBeanPostProcessor beanPostProcessor = (MyBeanPostProcessor) applicationContext.getBean("myBeanPostProcessor");
		beanPostProcessor.display();

		Cat cat = (Cat) applicationContext.getBean("cat");
		System.out.println(cat.toString());
	}
}
